﻿<Window x:Class="SessionHunter.Views.ReferencesView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d"
        Title="Session Hunter - References"
        Height="500"
        Width="800"
        DataContext="{Binding References, Source={StaticResource Locator}}">

    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Styles/Controls.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>

    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="50" />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition Height="70" />
        </Grid.RowDefinitions>
        <TextBlock x:Name="tbDescription" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Text="{Binding ReferencesView_Description, Source={StaticResource LocStrings}}" Margin="10,10,10,10" TextWrapping="Wrap"></TextBlock>
        <ListView x:Name="lstMissingAssemblies" ItemsSource="{Binding Path=MissingAssemblies}" Grid.Column="0" Grid.Row="1" Margin="30,30,30,30" Style="{StaticResource ListView_NonSelectable}" SizeChanged="lstMissingAssemblies_SizeChanged" >
            <ListView.View>
                <GridView>
                    <GridViewColumn Header="{Binding ReferencesView_MissingAssemblies_AssemblyColumn, Source={StaticResource LocStrings}}" Width="Auto"/>
                </GridView>
            </ListView.View>
        </ListView>
        <ListView x:Name="lstCurrentReferences" ItemsSource="{Binding Path=CurrentReferences}" SelectedItem="{Binding CurrentReferences_SelectedItem, Mode=TwoWay}" Grid.Column="1" Grid.Row="2" Margin="30,30,30,30" Style="{StaticResource ListView_NonSelectable}" SizeChanged="lstCurrentReferences_SizeChanged" SelectionMode="Single">
            <ListView.View>
                <GridView>
                    <GridViewColumn DisplayMemberBinding="{Binding FullAssemblyName}" Header="{Binding ReferencesView_CurrentReferences_AssemblyColumn, Source={StaticResource LocStrings}}" />
                    <GridViewColumn DisplayMemberBinding="{Binding Path}" Header="{Binding ReferencesView_CurrentReferences_PathColumn, Source={StaticResource LocStrings}}" />
                    <GridViewColumn DisplayMemberBinding="{Binding Error}" Header="{Binding ReferencesView_CurrentReferences_ErrorColumn, Source={StaticResource LocStrings}}" />
                </GridView>
            </ListView.View>
        </ListView>
        <Button x:Name="btnAdd" Grid.Column="0" Grid.Row="3" Command="{Binding Command_AddReference}" Style="{DynamicResource RoundedButton}" Width="130" Height="40" Content="{Binding Source={StaticResource LocStrings}, Path=Button_Add}"  BorderBrush="{StaticResource BlueButton}" Margin="25,0,0,15" VerticalAlignment="Bottom" HorizontalAlignment="Left"></Button>
        <Button x:Name="btnRemove" Grid.Column="0" Grid.Row="3" IsEnabled="{Binding SelectedItems.Count, ElementName=lstCurrentReferences}" Command="{Binding Command_RemoveReference}" Style="{DynamicResource RoundedButton}" Width="130" Height="40" Content="{Binding Source={StaticResource LocStrings}, Path=Button_Remove}"  BorderBrush="{StaticResource BlueButton}" Margin="165,0,0,15" VerticalAlignment="Bottom" HorizontalAlignment="Left"></Button>
        <Button x:Name="btnAddReferences" Grid.Column="0" Grid.Row="3" IsEnabled="{Binding SelectedItems.Count, ElementName=lstCurrentReferences}" Command="{Binding Command_AddReferencedAssemblies}" Style="{DynamicResource RoundedButton}" Width="130" Height="40" Content="{Binding Source={StaticResource LocStrings}, Path=Button_AddReferencedAssemblies}"  BorderBrush="{StaticResource BlueButton}" Margin="305,0,0,15" VerticalAlignment="Bottom" HorizontalAlignment="Left"></Button>
        <Button x:Name="btnClose" Grid.Column="0" Grid.Row="3" Command="{Binding Command_Close}" Style="{DynamicResource RoundedButton}" Width="130" Height="40" Content="{Binding Source={StaticResource LocStrings}, Path=Button_Close}"  BorderBrush="{StaticResource BlueButton}" Margin="0,0,25,15" VerticalAlignment="Bottom" HorizontalAlignment="Right"></Button>
    </Grid>
</Window>
